Integrand size = 40, antiderivative size = 100 \[ \int \frac {\sqrt {a+a \sin (e+f x)} (A+B \sin (e+f x))}{\sqrt {c-c \sin (e+f x)}} \, dx=-\frac {a (A+B) \cos (e+f x) \log (1-\sin (e+f x))}{f \sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}}+\frac {a B \cos (e+f x) \sqrt {c-c \sin (e+f x)}}{c f \sqrt {a+a \sin (e+f x)}} \]
[Out]
Time = 0.24 (sec) , antiderivative size = 100, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {3050, 2817, 2816, 2746, 31} \[ \int \frac {\sqrt {a+a \sin (e+f x)} (A+B \sin (e+f x))}{\sqrt {c-c \sin (e+f x)}} \, dx=\frac {a B \cos (e+f x) \sqrt {c-c \sin (e+f x)}}{c f \sqrt {a \sin (e+f x)+a}}-\frac {a (A+B) \cos (e+f x) \log (1-\sin (e+f x))}{f \sqrt {a \sin (e+f x)+a} \sqrt {c-c \sin (e+f x)}} \]
[In]
[Out]
Rule 31
Rule 2746
Rule 2816
Rule 2817
Rule 3050
Rubi steps \begin{align*} \text {integral}& = (A+B) \int \frac {\sqrt {a+a \sin (e+f x)}}{\sqrt {c-c \sin (e+f x)}} \, dx-\frac {B \int \sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)} \, dx}{c} \\ & = \frac {a B \cos (e+f x) \sqrt {c-c \sin (e+f x)}}{c f \sqrt {a+a \sin (e+f x)}}+\frac {(a (A+B) c \cos (e+f x)) \int \frac {\cos (e+f x)}{c-c \sin (e+f x)} \, dx}{\sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}} \\ & = \frac {a B \cos (e+f x) \sqrt {c-c \sin (e+f x)}}{c f \sqrt {a+a \sin (e+f x)}}-\frac {(a (A+B) \cos (e+f x)) \text {Subst}\left (\int \frac {1}{c+x} \, dx,x,-c \sin (e+f x)\right )}{f \sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}} \\ & = -\frac {a (A+B) \cos (e+f x) \log (1-\sin (e+f x))}{f \sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}}+\frac {a B \cos (e+f x) \sqrt {c-c \sin (e+f x)}}{c f \sqrt {a+a \sin (e+f x)}} \\ \end{align*}
Result contains complex when optimal does not.
Time = 2.36 (sec) , antiderivative size = 120, normalized size of antiderivative = 1.20 \[ \int \frac {\sqrt {a+a \sin (e+f x)} (A+B \sin (e+f x))}{\sqrt {c-c \sin (e+f x)}} \, dx=-\frac {\left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right ) \sqrt {a (1+\sin (e+f x))} \left ((A+B) \left (-i f x+2 \log \left (i-e^{i (e+f x)}\right )\right )+B \sin (e+f x)\right )}{f \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) \sqrt {c-c \sin (e+f x)}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(299\) vs. \(2(92)=184\).
Time = 2.53 (sec) , antiderivative size = 300, normalized size of antiderivative = 3.00
method | result | size |
parts | \(\frac {A \left (2 \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )-1\right )-\ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right )\right ) \sqrt {a \left (1+\sin \left (f x +e \right )\right )}\, \left (-\cos \left (f x +e \right )+\sin \left (f x +e \right )-1\right )}{f \left (\cos \left (f x +e \right )+\sin \left (f x +e \right )+1\right ) \sqrt {-c \left (\sin \left (f x +e \right )-1\right )}}-\frac {B \left (2 \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )-1\right ) \cos \left (f x +e \right )-2 \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )-1\right ) \sin \left (f x +e \right )-\ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right ) \cos \left (f x +e \right )+\ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right ) \sin \left (f x +e \right )+\cos ^{2}\left (f x +e \right )+\cos \left (f x +e \right ) \sin \left (f x +e \right )+2 \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )-1\right )-\ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right )+\sin \left (f x +e \right )-1\right ) \sqrt {a \left (1+\sin \left (f x +e \right )\right )}}{f \left (\cos \left (f x +e \right )+\sin \left (f x +e \right )+1\right ) \sqrt {-c \left (\sin \left (f x +e \right )-1\right )}}\) | \(300\) |
default | \(-\frac {\left (2 A \cos \left (f x +e \right ) \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )-1\right )-2 A \sin \left (f x +e \right ) \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )-1\right )-A \cos \left (f x +e \right ) \ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right )+A \sin \left (f x +e \right ) \ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right )+2 B \cos \left (f x +e \right ) \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )-1\right )-2 B \sin \left (f x +e \right ) \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )-1\right )-B \cos \left (f x +e \right ) \ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right )+B \sin \left (f x +e \right ) \ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right )+B \left (\cos ^{2}\left (f x +e \right )\right )+B \cos \left (f x +e \right ) \sin \left (f x +e \right )+2 A \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )-1\right )-A \ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right )+2 B \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )-1\right )-B \ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right )+B \sin \left (f x +e \right )-B \right ) \sqrt {a \left (1+\sin \left (f x +e \right )\right )}}{f \left (\cos \left (f x +e \right )+\sin \left (f x +e \right )+1\right ) \sqrt {-c \left (\sin \left (f x +e \right )-1\right )}}\) | \(345\) |
[In]
[Out]
\[ \int \frac {\sqrt {a+a \sin (e+f x)} (A+B \sin (e+f x))}{\sqrt {c-c \sin (e+f x)}} \, dx=\int { \frac {{\left (B \sin \left (f x + e\right ) + A\right )} \sqrt {a \sin \left (f x + e\right ) + a}}{\sqrt {-c \sin \left (f x + e\right ) + c}} \,d x } \]
[In]
[Out]
\[ \int \frac {\sqrt {a+a \sin (e+f x)} (A+B \sin (e+f x))}{\sqrt {c-c \sin (e+f x)}} \, dx=\int \frac {\sqrt {a \left (\sin {\left (e + f x \right )} + 1\right )} \left (A + B \sin {\left (e + f x \right )}\right )}{\sqrt {- c \left (\sin {\left (e + f x \right )} - 1\right )}}\, dx \]
[In]
[Out]
none
Time = 0.39 (sec) , antiderivative size = 175, normalized size of antiderivative = 1.75 \[ \int \frac {\sqrt {a+a \sin (e+f x)} (A+B \sin (e+f x))}{\sqrt {c-c \sin (e+f x)}} \, dx=\frac {B {\left (\frac {2 \, \sqrt {a} \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{\sqrt {c}} - \frac {\sqrt {a} \log \left (\frac {\sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + 1\right )}{\sqrt {c}} + \frac {2 \, \sqrt {a} \sqrt {c} \sin \left (f x + e\right )}{{\left (c + \frac {c \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (f x + e\right ) + 1\right )}}\right )} + A {\left (\frac {2 \, \sqrt {a} \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{\sqrt {c}} - \frac {\sqrt {a} \log \left (\frac {\sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + 1\right )}{\sqrt {c}}\right )}}{f} \]
[In]
[Out]
none
Time = 0.38 (sec) , antiderivative size = 141, normalized size of antiderivative = 1.41 \[ \int \frac {\sqrt {a+a \sin (e+f x)} (A+B \sin (e+f x))}{\sqrt {c-c \sin (e+f x)}} \, dx=\frac {\sqrt {2} {\left (\frac {2 \, \sqrt {2} B \cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}{\sqrt {c} \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )} + \frac {\sqrt {2} {\left (A \sqrt {c} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + B \sqrt {c} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )\right )} \log \left (-2 \, \cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 2\right )}{c \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}\right )} \sqrt {a}}{2 \, f} \]
[In]
[Out]
Timed out. \[ \int \frac {\sqrt {a+a \sin (e+f x)} (A+B \sin (e+f x))}{\sqrt {c-c \sin (e+f x)}} \, dx=\int \frac {\left (A+B\,\sin \left (e+f\,x\right )\right )\,\sqrt {a+a\,\sin \left (e+f\,x\right )}}{\sqrt {c-c\,\sin \left (e+f\,x\right )}} \,d x \]
[In]
[Out]